package com.rainripple.java.starter.user.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.rainripple.java.common.dao.IDao;
import com.rainripple.java.starter.user.entity.User;

@Component
@Transactional(readOnly = true)
public class AccountService {

	@Autowired
	private IDao dao;

	public List<User> getAllUser() {
		return dao.selectList(User.class);
	}

	public User get(Long id) {
		return dao.get(User.class, id);
	}

}
